package com.qf.first.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.first.entity.User;

public interface UserMapper extends BaseMapper<User> {
    default User selectUserByName(String username){
        LambdaQueryWrapper<User> lqw = new LambdaQueryWrapper();
        lqw.eq(User::getUsername,username);
        User user = this.selectOne(lqw);
        return user;
    }
}